<#--生成业务逻辑层IclassNameService的接口类-->
<#include "hihsoft_agreement.include">
<#assign className = table.className>  
<#assign classNameLower =className?uncap_first>   
package ${basepackage}.${subpackage}.service;
import java.util.*;

import org.hibernate.criterion.DetachedCriteria;
import ${basepackage}.${subpackage}.model.*;
import com.hihsoft.baseclass.service.BaseService;
import com.hihframework.exception.ServiceException;

<#include "java_copyright.include">
public interface ${className}Service extends BaseService{
	
	/**
	 * 新增、修改${className}信息
	 * 
	 * @param ${classNameLower}
	 * @throws DataAccessException
	 */
	 public  void saveOrUpdate${className}(${className} ${classNameLower}) throws ServiceException ;
	   /**
		 * 删除${className}信息
		 * 
		 * @param id
		 * @throws DataAccessException
		 */
	  public  void delete${className}(String id) throws ServiceException;

	 /**
		 * 通过HQL构造查询条件来查询符合条件的${className}信息
		 * 
		 * @param hql
		 * @return List
		 * @throws DataAccessException
		 */
	  public List get${className}ByHQL(String hql) throws ServiceException;
	  
		 /**
		 * 查询所有的${className}信息
		 * 
		 * @param hql
		 * @return List
		 * @throws DataAccessException
		 */
	  public List getAll${className}() throws ServiceException;

	 /**
		 * 根据主键查询${className}信息明细
		 * 
		 * @param id
		 * @throws DataAccessException
		 */
	  public ${className} get${className}ById(String id) throws ServiceException;
	 /**
		 * 把查询条件构造成数组来查询${className}信息
		 * 
		 * @param Object[]
		 *            filter
		 * @return List
		 * @throws DataAccessException
		 */
	  public List get${className}ByArray(Object[] filter) throws ServiceException;
	  /**
		 * 取得分页总数
		 * 
		 * @param hql
		 * @param filter
		 * @return
		 * @throws DataAccessException
		 */

	    public int get${className}DataTotalNum(Object[] filter)
	            throws ServiceException;
	    
	    
	    /**
		 * 把查询条件构造成MAP来查询${className}信息
		 * 
		 * @param Map
		 *            filter
		 * @return List
		 * @throws DataAccessException
		 */
	  public List get${className}ByMap(Map filter) throws ServiceException;

 /**
	 * 分页查询
	 * 
	 * @param hql
	 * @param object
	 * @param page_size
	 * @param pageNo
	 * @return
	 * @throws DataAccessException
	 */

	    public List get${className}PageDataByArray(Object[] filter, int page_size,
	                                 int pageNo) throws ServiceException;

	    
	    /**
		 * 分页查询。
		 * 
		 * @param hql
		 * @param obj：MAP条件构造
		 * @param page_size
		 * @param pageNo
		 * @return
		 * @throws DataAccessException
		 */
	    public List get${className}PageDataByMap(Map filter, int page_size, int pageNo)
	            throws ServiceException;

	    /**
		 * 利用SQL数组条件来查询记录
		 * 
		 * @param sql
		 * @param object
		 * @return
		 * @throws DataAccessException
		 */
	    public List get${className}ValueObjectWithSQLByArray(Object[] filter) throws ServiceException;

		/**
		 * 通过配置SQL来执行查询带多个参数的情况 包括SQL语句、存储过程等
		 * 
		 * @param queryName
		 * @param object
		 * @return
		 * @throws DataAccessException
		 */
		public List get${className}ValueObjectByNameQuery(String queryName,Object[] filter)throws ServiceException;
		
		/**
		 * 动态构造HQL参数
		 * @param detachedCriteria
		 * @return
		 * @throws ServiceException
		 */
		public List get${className}ValueObjectByDetachedCriteria(
				DetachedCriteria detachedCriteria) throws ServiceException;

		/**
		 * 动态构造HQL参数
		 * @param detachedCriteria
		 * @return
		 * @throws ServiceException
		 */
		public List get${className}ValueObjectByDetachedCriterias(
				DetachedCriteria detachedCriteria, int arg1, int arg2)
				throws ServiceException;

	  


}
